If Git is not already installed on your system download the newest version from http://git-scm.com
Tutorial:
A good tutorial for git can be found at
http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html and a more detailed tutorial can be found at
http://progit.org/book/.
Examples:
Before you work through these examples you should have read tutorial above and know how to checkout and commit code to a repository.
This example explains how to clone and use an existing repository (comsol) and how to use it.
- Login on hyper.pa.uky.edu
- Clone a existing repository. The command will create a new directory called comsol.
- git clone /home/dwagner/repos/comsol comsol
- git clone USERNAME@hyper.pa.uky.edu:/home/dwagner/repos/comsol comsol
- Go to the new directory comsol.
- Make any changes you want to do.
- To keep up with changes/pull changes done in the remote directory use:
If you want to create a public repository so that somebody else can access your code:
- Assume you have a local repository at cour computer!
- Log in on hyper.pa.uky.edu
- Create a directory where you want to store your new public
- mkdir repos
- mkdir repos/PROJECTNAME
- Go to the new directory
- Create the new repository (with the --bareoption yout tell Git that the only purpose of this repository is to share code. You can not commit changes directly to this repository!)
- git init --bare
- log off from hyper
- got to the location of your local repository
- push your your code to the remote repo
- git push USERNAME@hyper.pa.uky.edu:repos/PROJECTNAME